<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<#import "/page.ftl" as page />
	<link rel="stylesheet" type="text/css" href="/css/work_report.css">
	<link rel="stylesheet" type="text/css" href="/css/work_attend.css">
	<script type="text/javascript" src="/js/work_attend.js"></script>
	<div class="content-wrapper com">
	<#include "/head.ftl"/>
	<div class="content">
		<div class="tab">
			<div class="tab-header">
				<a title="刷新" class="btn btn-setting" onclick="refresh(this)">
					<i class="iconfont icon-refresh"></i>
				</a>
				<div class="tab-tool">
					<select class="st">
					<option value="">全部</option>
						<#list status['attend_complaint'] as status>
							<#if RequestParameters.st?? && RequestParameters.st!="" && RequestParameters.st?number==status.value>
								<option value="${status.value}" selected="selected">${status.name}</option>
							<#else>
								<#if st??&&status.value==st>
									<option value="${status.value}" selected="selected">${status.name}</option>
								<#else>
									<option value="${status.value}">${status.name}</option>
								</#if>
							</#if>
						</#list>
						
					</select>
					<input  class="name" type="text" placeholder="姓名查找...">
					<a class="search-btn">
						<i class="iconfont icon-search"></i>
					</a>
				</div>
			</div>
			<div class="tab-content">
				<div>
					<table style="width: 100%; border-collapse: collapse;">
						<tr>
							<th>员工</th>
							<th>申请时间</th>
							<th>申请内容</th>
							<th>状态</th>
							<th>操作</th>
						</tr>
						<#if !((complaint.content)?size gt 0)>
						<tr><td colspan="5">目前没有申诉需要处理噢~</tr>
						</#if>
						<#list (complaint.content) as c>
							<tr>
								<td>${c.workattend.user.realName}</td>
								<td>${c.time?string("yyyy-MM-dd HH:mm:ss")}</td>
								<td>${c.reason}</td>
								<#list status['attend_complaint'] as status>
									<#if status.value==c.state>
										<td><span style="font-weight: 600;background:${(status.color)!''}"  class="btn">${status.name}</span></td>		
									</#if>
								</#list>
								<#if c.state==0>
									<td><a data-content="${c.content}" data-id="${c.id}" class="btn btn-look"><i class="iconfont icon-search"></i><span> 查看</span></a></td>
								<#else>
									<td><span>无</span></td>
								</#if>
								
							</tr>
						</#list>
					</table>
				</div>
				<@page.page url=requestURI pager=complaint/>
			</div>
		</div>
	</div>
		<div class="chuli" style="display: none; padding: 0 40px;">
			<div class="ap-h">申  请  人 ： <span class="ns"></span></div>
			<div class="ap-h">申请消除：  <span></span></div>
			<div class="ap-r">
				<span class="et">申请原因：</span>
				<p></p>
			</div>
		</div>
		<div class="result" style="display: none; padding: 0 40px;">
		<div style="height: 15px;"></div>
			<div class="ap-r">
				<span class="et">处理说明：</span>
				<textarea placeholder="填写退回原因后，员工可以查看"></textarea>
			</div>
		</div>
	</div>
</body>
</html>